using System;
using System.Collections.Generic;
using System.Text;
using Emlyn.Website.Articles;

namespace Emlyn.Website.ArticlesPresentation
{
    public abstract class PresentArticleFactoryBase: IPresentArticleFactory
    {
        #region private members

        bool _editable;
        string _cssprefix;
        string _navigateUrl;

        #endregion

        #region constructor

        public PresentArticleFactoryBase()
        {
            _editable = false;
            _cssprefix = String.Empty;
            _navigateUrl = String.Empty;
        }

        #endregion

        #region protected members, must override

        protected abstract PresentArticle DoConstructPresentArticle();

        #endregion

        #region IPresentArticleFactory Members

        public bool aEditable
        {
            get
            {
                return _editable;
            }
            set
            {
                _editable = value;
            }
        }

        public string aCSSPrefix
        {
            get
            {
                return _cssprefix;
            }
            set
            {
                _cssprefix = value;
            }
        }

        public string aNavigateUrl
        {
            get
            {
                return _navigateUrl;
            }
            set
            {
                _navigateUrl = value;
            }
        }

        public PresentArticle ConstructPresentArticle()
        {
            return DoConstructPresentArticle();
        }

        #endregion
    }
}
